home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Graphics / Utilities / POVRAY / POVRAY II / POV-Ray / POV-Ray.rsrc / TEXT_301_bicubic_patch.txt < prev    next >
Text File  |  1994-02-10  |  1KB  |  26 lines

  1. // 3D curved surface created from a mesh of triangles
  2. bicubic_patch
  3. {
  4.   type 1 // patch_type (0..4)
  5.   // 0 = Bezier patch, just store the triangular vertices
  6.   // 1 = Bezier patch, store all plane equations defined by
  7.   //       the triangulation of the patch into sub patches
  8.   // 2 = Bezier patch, use binary subdivision to find the
  9.   //       point of surface intersection.
  10.   // 3 = Bezier patch, use binary subdivision & pre compute
  11.   //       and store all vertices
  12.   // 4 = Bezier patch, vertices, all plane equations, normals
  13.   //       at each vertex of a subpatch are stored (to be used
  14.   //       for a smooth triangle shading in each of subpatch).
  15.   flatness 0.1 // flatness value (valid for type 2 or 3 only, remove for 0,1,4?)
  16.   //       flatness_value = 0.01 to 1.0, with higher values
  17.   //        giving flatter, less smooth results
  18.   u_steps 3 // # of triangles to subdivide (1-5)
  19.   v_steps 3 // # of triangles to subdivide (1-5)
  20.   <0, 0, 2> <1, 0, 0> <2, 0, 0> <3, 0, -2>
  21.   <0, 1, 0> <1, 1, 0> <2, 1, 0> <3, 1,  0>
  22.   <0, 2, 0> <1, 2, 0> <2, 2, 0> <3, 2,  0>
  23.   <0, 3, 2> <1, 3, 0> <2, 3, 0> <3, 3, -2>
  24. }
  25.  
  26.